package com.situ.mvc.service;

import java.util.List;
import java.util.Map;

import com.situ.mvc.entity.PageBean;
import com.situ.mvc.entity.Student;
import com.situ.mvc.entity.StudentSearchCondition;

public interface IStudentService {
	/**
	 * 
	 * @param student
	 * @return 插入成功返回true，失败返回false
	 */
	public abstract boolean insert(Student student);
	/**
	 * 返回所有学生的集合
	 * @return
	 */
	public abstract List<Student> list();
	/**
	 * 根据id删除
	 * @param id
	 * @return 删除成功返回true 失败返回false
	 */
	public abstract boolean deleteById(Integer id);
	public abstract Student findById(Integer id);
	public abstract boolean update(Student student);
	List<Student> findByName(String name);
	/**
	 * 通过pageNo和pageSize封装成pageBEna对象
	 * @param pageNo
	 * @param pageSize
	 * @return
	 */
	
	
	/**
	 * 批量删除
	 * @param selectIds
	 * @return 
	 */
	public abstract boolean deleteAll(String[] selectIds);
	/**
	 * ajax使添加学生姓名不重复
	 * @param name 
	 * @return
	 */
	public abstract boolean checkName(String name);
	
	//public abstract PageBean getPageBean(int pageNo, int pageSize);
	public abstract PageBean<Map<String, Object>> getPageBean(int pageNo, int pageSize);
	//搜索
	public abstract PageBean<Map<String, Object>> getPageBean(StudentSearchCondition searchCondition);
	
	
}
